package com.fss.mycomment1.service.impl;

import java.util.List;
import com.fss.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fss.mycomment1.mapper.Mycomment1Mapper;
import com.fss.mycomment1.domain.Mycomment1;
import com.fss.mycomment1.service.IMycomment1Service;

/**
 * 评论Service业务层处理
 * 
 * @author llf
 * @date 2024-12-02
 */
@Service
public class Mycomment1ServiceImpl implements IMycomment1Service 
{
    @Autowired
    private Mycomment1Mapper mycomment1Mapper;

    /**
     * 查询评论
     * 
     * @param id 评论主键
     * @return 评论
     */
    @Override
    public Mycomment1 selectMycomment1ById(Long id)
    {
        return mycomment1Mapper.selectMycomment1ById(id);
    }

    /**
     * 查询评论列表
     * 
     * @param mycomment1 评论
     * @return 评论
     */
    @Override
    public List<Mycomment1> selectMycomment1List(Mycomment1 mycomment1)
    {
        return mycomment1Mapper.selectMycomment1List(mycomment1);
    }

    /**
     * 新增评论
     * 
     * @param mycomment1 评论
     * @return 结果
     */
    @Override
    public int insertMycomment1(Mycomment1 mycomment1)
    {
        mycomment1.setCreateTime(DateUtils.getNowDate());
        return mycomment1Mapper.insertMycomment1(mycomment1);
    }

    /**
     * 修改评论
     * 
     * @param mycomment1 评论
     * @return 结果
     */
    @Override
    public int updateMycomment1(Mycomment1 mycomment1)
    {
        return mycomment1Mapper.updateMycomment1(mycomment1);
    }

    /**
     * 批量删除评论
     * 
     * @param ids 需要删除的评论主键
     * @return 结果
     */
    @Override
    public int deleteMycomment1ByIds(Long[] ids)
    {
        return mycomment1Mapper.deleteMycomment1ByIds(ids);
    }

    /**
     * 删除评论信息
     * 
     * @param id 评论主键
     * @return 结果
     */
    @Override
    public int deleteMycomment1ById(Long id)
    {
        return mycomment1Mapper.deleteMycomment1ById(id);
    }
}
